home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / get22.arc / GET.DOC next >
Text File  |  1991-05-28  |  37KB  |  579 lines

  1. File:GET.DOC  -  Documentation for GET.EXE  -  Copyright 1991 Bob Stephan
  2.  
  3. PURPOSE: GET is a general purpose DOS BATch file enhancer.  Its purpose is 
  4.   to make information available to the BATch file through the BATch IF 
  5.   subcommand.  The information can come from user input or from the 
  6.   operating system, and it is made available to the BATch file through the 
  7.   ERRORLEVEL (Exit Code) and the GET= variable in the DOS master 
  8.   environment. Get also has some capabilities to set some system parameters 
  9.   and perform a few other specific actions.  Most of the items are 
  10.   self-explanatory as seen in the help screen below.  For those which may 
  11.   need more explanation, read on.  If you have been using an older version 
  12.   of GET, you will probably also be interested in the information in 
  13.   GET22NEW.DOC to help focus in on the new and improved features.
  14.  
  15. HELP SCREEN:  If you enter GET at the DOS prompt by itself, or with any 
  16.   invalid argument such as a question mark, it will display the following 
  17.   information:
  18.   -------------------------------------------------------------------------
  19. GET Version 2.2   -   Batch file enhancer   -   Copyright 1991 Bob Stephan
  20.   Syntax:  GET command argument(s)               More Instructions: GET.DOC
  21. Purpose             Command   Argument(s)   Environment Errorlevel  Extended
  22. ---------           -------   -----------   --(GET=)--- --(Exit)--  --[E]---
  23. Get character(InKey)C[E] ["prompt"][chars#sec] Character ASCII dec.  No Echo
  24. Get yes/no aNswer   N[E] ["prompt"] [seconds] Character  ASCII dec.  No Echo
  25. Get string          S[E] ["prompt"][pattern#sec] String  Length      No Echo
  26. Put string (Zap)    Z[E] ["string/prompt"]   String      Length      StdInput
  27. Moving Text(GetaKey)T[E] "filespec" [chars]  Character   ASCII dec.  No Echo
  28. Key check (IsaKey)  I[E]                     1=yes,0=no  1=yes,0=no  Get Char
  29. Date and Time       H[E] Code 1=DoW, 2=DoM, 4=Month, etc.See GET.DOC Concat
  30. Get DOS version     D[E]                     Major Vers. MajorMinor  MinorEnv
  31. Keyboard BUffer     U[E] "chars" [num#num]               Length      Caps/Num
  32. Get environment left   E[E]                  Bytes left  Bytes left  Bytes/10
  33. Get file size (DIR=0)  F[E]  Filespec        Hex bytes   Kilobytes   Kb/10
  34. Get disk free space    K[E] [driveletter#div] Kilobytes  Kb/10       Kb/100
  35. Get disk capacity      Q[E] [driveletter#div] Kilobytes  Kb/10       Kb/100
  36. Get volume label       L[E] ["label"] [drive] Label      1=yes,0=no  Match
  37. Get memory free        M[E]                  Kilobytes   Kilobytes   Kb/10
  38. Clear (Blank) Screen   B[E] [New attribute]  Current or last attr.   HexAttr
  39. Check for printer(PRN) P[E]                  1=yes,0=no  1=yes,0=no  Initialize
  40. Get/set video mode/border V[E] [New mode/color] Current or last mode VGA Border
  41. Check coprocessor/CPU   7[E]                 1=yes,0=no  1=yes,0=no  CPU Type
  42. Check for ANSI.SYS/Model  A[E]               1=yes,0=no  1=yes,0=no  PC Model
  43. Get current directory   Y[E] [drive for Y]   Directory   Level/Drive Drive:A=0
  44. Warm/Cold Boot          W[E] If argument given then 1=warm, 0=cold   ColdBoot
  45.  See GET.DOC for additional features and BATch programming instructions.
  46.  Surrogates:}=CR,~=Esc,Alt253=Ctrl-C,Alt255=Space.     Keys:{=Ext,Alt254=Enh.
  47.  -----------------------------------------------------------------------------
  48.  
  49. LICENSING: VENDORS, CORPORATE, and COMMERCIAL users see licensing terms 
  50.   below. For individuals this version of GET is free for personal use, and 
  51.   for the use of shareware authors in distributing their products subject 
  52.   to the conditions specified in the licensing terms below.  GET may be
  53.   freely copied and distributed provided the files GET.DOC and 
  54.   GET22NEW.DOC are included on the disk with it.  Contributions to support
  55.   this development project will be gratefully accepted.
  56.  
  57. ENTERING COMMANDS: GET is used in BATch files.  When you want to use GET in 
  58.   a BATch file, enter the word GET as the first entry on a line, followed 
  59.   by a space and the single letter command from the above table.  If you 
  60.   want the extended option, enter E right after the command letter with no 
  61.   space between.  If there are arguments, enter a space and then the 
  62.   arguments that you need or want to run the command.  On the next line 
  63.   check the return from GET in the ERRORLEVEL and/or the GET= variable in 
  64.   the environment which can be accessed as %GET%.  For example, to get a 
  65.   yes or no answer you might enter the lines:
  66.  
  67.      :Ask
  68.      GET N "Answer yes or no: "
  69.      IF "%GET%"=="N" goto NO
  70.      IF "%GET%"=="Y" goto YES
  71.      Rem The next line checks to see if the user pressed Escape
  72.      if ERRORLEVEL 126 goto END
  73.      ECHO You must enter Y or N, or press Esc to exit.
  74.      goto ASK
  75.      :NO
  76.      Rem [Do what you need to do if the user enters N]
  77.      goto END
  78.      :YES
  79.      Rem [Do what you need to do if the user enters Y]
  80.      :END The next line clears GET out of the environment.
  81.      set GET=
  82.  
  83.   The best way to find out how GET works is to just try it.  You can try 
  84.   it from the command line if you use SET to check the environment, but 
  85.   to find out what is in the ErrorLevel, you must use a BATch file.  If you
  86.   are not familiar with the DOS Environment, see the discussion of 
  87.   ENVIRONMENT AND SHELLS later in this documentation.
  88.  
  89. SYNTAX EXPLANATIONS: 
  90.  
  91.   Command: Commands are single characters or [optionally] a character 
  92.     immediately followed by E with no spaces between.  The E indicates the 
  93.     Extended function above.
  94.  
  95.   Argument(s):  Arguments are zero, one, or two character strings as 
  96.     appropriate to the command.  In some cases the first, or only, argument 
  97.     must be enclosed in double quotes as shown on the help screen.  Each 
  98.     character string can consist of zero or more ASCII characters.  The blank 
  99.     or space character (ASCII 32) delimits the character strings and can only 
  100.     be a member of one of the strings that is enclosed in double quotes.
  101.  
  102.   [] brackets indicate optional portions of commands and/or arguments. The
  103.      command will work regardless whether these portions are included or not.
  104.      The brackets themselves must not be included!
  105.   "  Where double quotes ("'s) are shown, they must be included if the
  106.      corresponding prompt or filespec argument is used.
  107.   filespecs consist of a filename and extension as appropriate to the DOS
  108.      file naming conventions.  They may include drive and path but no wild 
  109.      card symbols.
  110.   chars refers to an ASCII character string.  Blanks can only be used in 
  111.      the strings that must be enclosed in double quotes (but see the use of
  112.      surrogates below.)
  113.   #  is a delimiter denoting that the characters following it are numerical 
  114.      and have a special significance to the command.
  115.   num, sec, and div must be entered as ASCII decimal digit characters 
  116.      representing a number.
  117.  
  118.   Environment: this column indicates what will be found in the
  119.      environment string GET=.  This string can be accessed from a
  120.      BATch file with the %GET% notation. It is best to enclose %GET%
  121.      in some additional characters in case it is empty.  For example:
  122.      IF "%GET%" == "" will check for an empty GET variable.
  123.  
  124.   Errorlevel: this column indicates what value will be placed in the
  125.      DOS errorlevel that can be accessed in BATch files with the
  126.      "if errorlevel" subcommand.  Always check for ErrorLevel from 
  127.      highest to lowest values of interest. ErrorLevel is also referred
  128.      to as Exit Return Code.
  129.  
  130.   Extended: this column indicates the action taken if the optional
  131.      [E]xtended command is included.  Do not include the brackets!
  132.      In most cases E applies to the result in the Environment or the
  133.      result in the ErrorLevel, but not to both.
  134.  
  135.   Surrogates and Extended Characters:  Some characters are awkward or 
  136.      impossible to handle directly.  For example, BATch files generally use 
  137.      the carriage return <CR> and space characters as delimiters instead
  138.      of as ASCII characters that can be manipulated.  Some special symbols
  139.      have been designated to facilitate the handling of these characters.
  140.      Extended keys are those with no ASCII representation, such as the
  141.      function and cursor keys.  Enhanced keys are keys on the enhanced
  142.      keyboard which do not appear on older keyboard layouts, such as F11
  143.      and F12. These substitutions may have different meanings depending
  144.      on the command being used, so read the description of the command.
  145.        Carriage Return: }=CR            Extended:       {=Ext
  146.        Escape:          ~=Esc           Enhanced: Alt-254=Enh
  147.        Blank:     Alt-255=Space.        Break:    Alt-253=Ctrl-C
  148.      The Alt- characters can be entered in most text editors by holding 
  149.      down the Alt key while spelling out the digits for the character on
  150.      the number pad of the keyboard, but check your text editor for this
  151.      capability.
  152.    
  153. GET USER INPUT:  The commands C, N, T, S, I, and Z pertain to obtaining
  154.   keyboard input from the user.  These commands take 0, 1, or 2 arguments.  
  155.     
  156.   "prompt"  refers to an arbitrary character string that will be displayed
  157.     on the screen to coach the user at to what type of input is expected.
  158.     If a prompt is used, it must be enclosed in double quotes.
  159.   chars -- also see char information above -- are ASCII character strings 
  160.     which cannot include the space character, but may include surrogates. If 
  161.     chars are given, user input will be limited to the characters in the 
  162.     character string, or the ones indicated by the surrogates. If no chars 
  163.     are given, any key stroke will be accepted. To indicate that a carriage 
  164.     return, Esc, space, or Extended key is acceptable, include the surrogate 
  165.     character listed above.  CR and Esc will return 125 and 126 in the 
  166.     errorlevel respectively, and the surrogate character in the environment. 
  167.     If extended keyboard characters are specified, the scan code will be in 
  168.     the errorlevel and the corresponding ASCII byte in the environment 
  169.     preceded by "{".  A table of keyboard scan codes will be useful.    
  170.     Think of ASCII 255 as an upper-case Space for purposes of GET input.
  171.   Enhanced: To indicate that enhanced characters (e.g., F11 and F12) are 
  172.     acceptable, include the ASCII 254 character instead of {. If you use 
  173.     ASCII 254 as the surrogate for extended keys, the BIOS function for the
  174.     enhanced keyboard will be used.  This permits the recognition of F11 
  175.     and F12 as well as other enhanced keyboard keys.  ASCII 254 can 
  176.     usually be entered by using Alt-254 on the numeric keypad, but check 
  177.     your text editor for the method it uses.  This should not be used 
  178.     unless you are sure that all users of your batch file will be using 
  179.     enhanced keyboards because it absolutely does not work on machines 
  180.     with older BIOS's that do not recognize the extra enhanced keyboard 
  181.     keys.
  182.   Break: A surrogate of ASCII 253 will suppress Control-C and Ctrl-Break
  183.     exception handling.  This must be the last or only character
  184.     argument. It applies only to the S, C, or N commands, and should 
  185.     be used with caution. Note that this surrogate has a different kind of
  186.     meaning and function than the other surrogates.
  187.   pattern is a special case of chars in which certain characters have 
  188.     special meanings.  See the S command for detailed information.
  189.   # is a delimiter that must immediately follow the chars or pattern 
  190.     argument if it is used.  The number following # will be used to 
  191.     establish the number of seconds to wait for the first key stroke to 
  192.     be entered.  If timeout takes place with nothing entered, the 
  193.     ErrorLevel will be 0, and there will be no GET variable in the 
  194.     environment.  If no time is specified, GET will wait forever.  If a 
  195.     wrong key is pressed the timeout is cancelled.  The #seconds must be 
  196.     the last argument, and must contiguously follow any other character 
  197.     argument.  Example: GET C YN#20 will wait 20 seconds for a character 
  198.     to be entered.  If none are entered in that time, GET will exit with 
  199.     0.  If a wrong character (not Y or N) is entered, GET will wait 
  200.     until a correct character is entered regardless of the time.
  201.     
  202.   General: The C, N, and S commands read characters using a BIOS call so 
  203.     they bypass Standard Input and most keyboard redefinition methods 
  204.     (macros).  The argument for the C, N, or S commands can consist of 
  205.     [chars][Alt253][#seconds] in that order, and it must be contiguous.
  206.   Please remember that <, >, and | are DOS redirection characters and you 
  207.     cannot use them as characters in BATch files.  4DOS also uses ^ and 
  208.     ` as special characters so they should not be used either.
  209.     Single keystrokes for C, N or T are acted on without pressing Enter.
  210.     (String input, of course, will require the user to press Enter.)
  211.     The comparison of characters is not case sensitive.  
  212.   When checking for string matching with the MS DOS BATch IF subcommand, 
  213.     remember that it is case sensitive. Different versions of DOS handle the 
  214.     IF "string"=="string" somewhat differently, and there have been several 
  215.     "bugs" reported in one version or another.  Try to test any such 
  216.     constructs under several versions including DR DOS and 4DOS if possible.  
  217.     In some versions the string cannot contain any spaces.  The test under 
  218.     4DOS is not case sensitive, and it can contain spaces if the strings are 
  219.     enclosed in double quotation marks.
  220.  
  221.   C  accepts single keystroke character input.  The keystroke will not
  222.      be echoed to the screen if CE is used. It is often convenient to ask 
  223.      the user to press the space bar, and the space surrogate makes it easier 
  224.      to check for a space. (i.e., IF "%GET%"==" " does not work in all DOS 
  225.      systems if GET contains the space character.)
  226.   N  is a special case of C.  The yes/no aNswer will accept y, n, carriage
  227.      return, or Esc.  The Ctrl-C surrogate and a number of seconds to wait 
  228.      may be specified, but no other chars will be recognized.
  229.   T  the Moving Text feature, is another special case of C.
  230.      T requires a file with the prompt string which will be displayed moving 
  231.      across the bottom line of the screen. Currently only standard 25 line 
  232.      screens are supported.  The text file should be plain ASCII without any 
  233.      control characters (No CR, LF, or any other characters below ASCII 32).  
  234.      To be effective the prompt must be over 80 or more characters long, and 
  235.      to ensure smooth wrap-around the first 79 characters should be repeated 
  236.      at the end.  The maximum length for the text of the moving prompt is 
  237.      4096 characters.  Over that it will be truncated.  T does not accept
  238.      a waiting period argument at this time.
  239.   S  accepts character string input terminated by a carriage return.
  240.      SE does not echo user input to the screen.  This is useful for 
  241.      hiding the entry of a password, for example.  Extended and enhanced
  242.      keys will not be accepted, but break can be suppressed.  The length of
  243.      the string entered is returned in ErrorLevel.  If the user presses Esc,
  244.      GET will exit and leave the Esc surrogate in the Environment and 1 in
  245.      ErrorLevel. The length of a string for the S command can be specified 
  246.      by creating an argument of characters equal in number to the maximum
  247.      length of the string allowed.  No argument defaults to 79 characters.  
  248.      A beep will be sounded if the maximum length has been reached and more 
  249.      characters are attempted.  
  250.        The pattern in the argument specifies the acceptable characters
  251.      for each position as follows.  Note that the upper case 
  252.      characters T, A, and Z will cause lower case characters to be 
  253.      converted to upper case.  Conversions to upper case also
  254.      cause the space character to be converted to ASCII 255.  This will 
  255.      facilitate BATch file checking with the IF subcommand. 
  256.        tT - any typeable character,     T - a-z will be upper cased.
  257.        aA - any alphabetic character,   A - a-z will be upper cased.
  258.        zZ - any alphanumeric character, Z - a-z will be upper cased.
  259.         9 - any digit 0-9.           Alt-255 - space character only.
  260.        Any other character must match the character entered exactly.  
  261.   I  checks to see whether a key has been pressed but it does not wait
  262.      for a keystroke if none is in the buffer.  The IE command will
  263.      read the key if it is present or return 0 and expunge GET from the 
  264.      environment if no character is waiting.  Any character will be 
  265.      accepted including extended characters, and no surrogate 
  266.      translation is made.  The difference in the IE command from the C
  267.      command is that IE checks DOS Standard Input so it responds
  268.      to redirected input and Ctrl-C, but it cannot see keys that are only 
  269.      available on the enhanced keyboard such as F11 and F12.
  270.  Z   uses the "prompt" string as input.  It will put the "prompt" 
  271.      string into the master environment (if it can find the master 
  272.      environment).  GET ZE, like the old GET S, will take input from 
  273.      Standard Input and transfer it to the GET= variable in the 
  274.      current environment.  The input must be less than 80 characters 
  275.      and must be terminated with a carriage return.  GET ZE will take 
  276.      input from the keyboard (Get String), or from redirection or 
  277.      piping.  For example, CD|GET ZE is another way to get the current 
  278.      directory into the master environment. You can even read the first 
  279.      line of a text file with GET ZE<filespec. If you don't want to see 
  280.      the echo from DOS, redirect output to NUL - e.g.  CD|GET ZE>NUL or 
  281.      GET ZE<filespec>NUL.  If you specify a prompt for ZE, it will be 
  282.      displayed before reading standard input.  Note that only Z attempts
  283.      to put the GET variable in the MASTER environment.  If GET is running
  284.      under a secondary command processor, the GET variable may not be
  285.      available to the current BATch file.  See discussion of SHELLS later.
  286.  
  287. GET DISK and FILE Information:  The commands K, Q, L, F, and Y obtain 
  288.   information about disks and/or files.  Q, K and L will check if the drive 
  289.   contains a formatted disk and return an ERRORLEVEL 0 if it does not.  
  290.   This avoids the Abort, Retry, etc. error handling.  If the ERRORLEVEL is 
  291.   0 the error code will be in %GET% as a hexadecimal value.  
  292.      Some error values of interest are: 
  293.       0 - Write protected diskette
  294.       1 - Invalid drive letter
  295.       2 - Drive not ready - no disk or door open.
  296.       4, 6, 7, 8, & B - Disk read errors
  297.       C - General, nonspecific error.
  298.       F - Invalid disk change
  299.  
  300.   K disK free space in kilobytes.  The only argument is a drive letter.
  301.     The default is the current drive.
  302.   Q The capacity of a disk.  GET Q works just like GET K except that it 
  303.      returns the capacity of the disk as if it were empty. Q for Quota?
  304.   For Q and K the extended command divides the ERRORLEVEL by 100 but doesn't 
  305.   reduce the Environment variable.  If you need a different divisor for 
  306.   KE you can use the # notation similar to the timeout feature.  For example
  307.   if you want the ERRORLEVEL in megabytes you can enter GET KE #1024.  This 
  308.   will override the default division by 100 for KE.  Prior to version 2.2, 
  309.   GET did not report accurate information on the new large hard disk 
  310.   partitions. This is now corrected, and the # feature will be needed to 
  311.   get ERRORLEVEL information on such large partitions.
  312.  
  313.   L  gets the Volume Label of the specified disk.  The ErrorLevel contains
  314.      the length of the label (0-11 characters). The optional argument is
  315.      the drive letter, defaulting to the current drive.  If the disk is not 
  316.      labelled, the GET variable will be expunged and the ERRORLEVEL will be 
  317.      0.  The LE command takes a trial label in the "label" argument 
  318.      and sets the ERRORLEVEL to indicate whether the disk label
  319.      matches.  The comparison is case sensitive and there must not be
  320.      any trailing blanks in the "label" argument.
  321.   F  file size in kilobytes.  The file size is reported in the Environment
  322.      in hexadecimal and in the ErrorLevel as kilobytes.  For KE the divisor
  323.      is 10.  This affects the ErrorLevel only.
  324.      The file specification (filespec) is not in quotes and must not
  325.      contain wild card characters, but may contain drive and path information.
  326.      Directory existence.  The F command for GET Filesize can now be used to
  327.      determine whether a named directory exists.  As usual, if the filespec
  328.      is a directory, the ErrorLevel will be 0.  If the filespec cannot be 
  329.      found, the GET variable will be expunged from the environment and a
  330.      standard DOS error code will be returned in the ErrorLevel.  The 
  331.      error codes of special interest are 2 for "File not found" and 3 for 
  332.      "Path not found".  For example: GET F "d:\mydir\xxx" will return 
  333.      2 if the path is found but not the file named XXX, and it will return 
  334.      a 3 if the path D:\MYDIR is not found.  Also, GET F "d:\mydir" 
  335.      will return 2 in either case since it is not clear whether MYDIR 
  336.      is a file or a path.  Whenever the item specified in the filespec 
  337.      may not exist, always check for an empty GET variable (IF "%GET%"=="")
  338.      which indicates that an error code is in the ErrorLevel. 
  339.   Y  gets the current directory.  It takes an optional drive letter argument
  340.      which defaults to the current drive.  The ErrorLevel reports the 
  341.      directory level - 0 = root directory, 1 for first subdirectory level,
  342.      etc.  YE returns the current drive.  The drive letter is in the 
  343.      Environment, and the drive number in the ErrorLevel - 0=A, 1=B, etc.
  344.  
  345. GET MEMORY/SYSTEM Information:  The commands B, P, V, E, M, D, 7, A, and H
  346.   obtain information about the operating system and hardware configuration.
  347.  
  348.   B  the screen Blanker actually performs a clear screen, not a blanking.
  349.      GET B uses your color settings unless you give it a different
  350.      attribute to use.  It automatically adapts to any number
  351.      of lines on the screen (e.g. EGA 43 or VGA 50).  If an attribute
  352.      argument is given it is taken to be a 1, 2, or 3-digit decimal number
  353.      that is converted to a two-digit hexadecimal number for the attribute.
  354.      The extended function BE regards an argument as a 1 or 2-digit hex
  355.      number, and the GET value in the environment is in hex.
  356.      A table of DOS screen attributes will be useful.
  357.   P  checks whether a printer is available and ready.  1=yes, 0=no.
  358.      The [E] option sends the DOS BIOS initialization signal to the printer
  359.      as it does during boot-up.  This may not work if a print buffer or
  360.      spooler is in use unless it can be bypassed.  If your printer has an
  361.      internal buffer this is a way to flush it.  If PE reports no 
  362.      printer then the print-screen operation (the Print Screen or Shift 
  363.      PrtSc key) will be disabled to prevent hanging the computer if the 
  364.      PrtSc key is inadvertently pressed.  To enable print-screen again, 
  365.      run GET PE with a printer attached and ready.
  366.   V  gets and optionally sets the video mode.  A table of video modes
  367.      will be helpful.  Don't fool around with Video mode unless you know 
  368.      what you're doing to prevent setting a mode that is not supported by
  369.      your monitor. VE will get/set the border color on a VGA or EGA monitor.
  370.   E  reports the number of bytes of Environment space available.  If it
  371.      might be over 255 use EE which divides the number of bytes by 10.
  372.   M  reports the free memory available in kilobytes.  ME divides by 10.
  373.   D  reports the DOS version.  The ErrorLevel will contain a number such as
  374.      33 for DOS 3.3.  The Environment will contain the major version such 
  375.      as 3 for DOS 3.0, 3.1, 3.3, or 3.3.  DE will report the minor version
  376.      in the Environment such as 1 for DOS 3.1.
  377.   7  reports whether a math coprocessor is installed.  1=yes, 0=no.
  378.      GET 7E reports the CPU chip type - 0 for 8088/86, 2 for 80286, or
  379.      3 for 80386 or later.
  380.   A  reports whether ANSI.SYS is loaded.  If you are using an ANSI.SYS 
  381.      clone, check to see if it works with yours.
  382.      GET AE will return the ROM BIOS model byte.  At this time the 
  383.      only documented bytes listed in "The NEW Peter Norton's 
  384.      Programmer's Guide to the IBM PC and PS/2" (Page 64) are:
  385.       FF(255)=PC(1981)    FE(254)=PC or PC/XT(1982)    FD(253)=PCjr(1983)
  386.       FC(252)=PC/AT(1984-85),PC/XT Model 286(1986),PS/2 Model 50/60(1987)
  387.       FB(251)=PC/XT(1986)      FA(250)=PS/2 Model 25(1987)/30(1986)
  388.       F9(249)=PC Convertible   F8(248)=PS/2 Model 80(1987)
  389.       (Example: My 80386 AT clone is an FC).
  390.   H  The new H Date and Time command works slightly differently than 
  391.      most of the others.  The value(s) to be gotten are determined by 
  392.      a coded numerical argument.  The codes to be summed are:
  393.       1 Day of the Week(default)  16 Hour
  394.       2 Day of the Month          32 Minute
  395.       4 Month                     64 Second
  396.       8 Year                     128 Odd or Even
  397.      With the HE command, you add up the codes for the values you want 
  398.      concatenated together in the environment.  With this form of the 
  399.      command the ErrorLevel is the length of the GET variable, but it 
  400.      is not very meaningful or useful. The unextended H command will 
  401.      return a single value in both the ErrorLevel and the Environment.  
  402.      If you sum codes for H, only the lowest value in the sum will be 
  403.      recognized and the value returned.  If 128 is added in, the 
  404.      ErrorLevel will report only if the value is Odd(=1) or Even(=0)
  405.      for H.  128 does nothing for HE.  Example:  GET HE 14  will
  406.      set GET=mm-dd-yy and place 8 in the ERRORLEVEL.
  407.  
  408. PERFORM AN ACTION: The GET commands U, V, B, P, W, and Z will perform
  409.   some system action or setting.  V, B, P, and Z have already been
  410.   documented above and only a brief review will be given here.
  411.  
  412.   V  can set video mode or border color.
  413.   B  can set the screen attribute.
  414.   P  can reset the printer and turn off PrtSc.
  415.   Z  can place a string in the master environment.
  416.   W  will reboot the computer as if the 3-finger salute was pressed.  
  417.      WE will reboot as if the computer was turned off then on again.  
  418.      If any characters are present as an argument, GET will attempt to 
  419.      determine if the preceding boot was warm or cold instead of 
  420.      rebooting.  This does not work on all machines (it worked on my XT
  421.      but not  on my 386).  If successful, a 1 indicates the previous boot
  422.      was warm, 0 means it was a cold boot.
  423.   U  will stack keys in the keyboard bUffer.  The syntax is
  424.        GET U "chars" num#num 
  425.      where chars are any ASCII characters you want stacked, and the "num"s
  426.      are decimal representations of values for either ASCII codes or scan 
  427.      codes.  Up to 4 digits can be used for either number.  E.g. to end 
  428.      the string with a carriage return use #13. To enter a scan code 
  429.      add it to 255.  E.g. the scan code for F1 is decimal 59 so use 
  430.      314. The following will stack the word "help" in the buffer and 
  431.      execute it as a command by stacking the Enter key: 
  432.       GET U "help" #13 
  433.      The following command will stack the F1 key: 
  434.       GET U 314 
  435.      NOTE: GET U will only work on AT class machines and later! 
  436.      With GET U you can provide a default entry for a GET S string; 
  437.      however, the DOS keyboard buffer only holds 16 characters, so it has 
  438.      to be rather short.  Use GET U "default" followed by GET S "prompt", 
  439.      and the default string will be entered for the user.  The user can 
  440.      either change or accept it; but the user will have to backspace to 
  441.      change it. 
  442.      The UE command will let you adjust the Caps, Num, and Scroll Locks. 
  443.      Sum the numbers for Scroll=16, Num=32, Caps=64 for the Locks you want 
  444.      to set.  The other(s) will be cleared.  You must use GET UE #num.
  445.         
  446. ENVIRONMENT AND SHELLS: This is a brief, general discussion of the DOS
  447.    Environment for those who may not be sufficiently familiar with it.
  448.  
  449.    The DOS Environment is a small area (usually) of memory that DOS 
  450.    automatically allocates to every program that it is asked to load or 
  451.    run.  The "master" environment is the original Environment allocated to 
  452.    COMMAND.COM or 4DOS or whichever command processor you are using.  The 
  453.    original size of the Environment can be set in later versions of DOS by 
  454.    using the SHELL command in your CONFIG.SYS file.  However, the setting 
  455.    of Environment size is not a SHELL command function, but is a command 
  456.    processor option.  For example, the COMMAND.COM /E: switch lets you set 
  457.    the size if you are using COMMAND.COM as your command processor.  For 
  458.    documentation look under such topics as SHELL, COMMAND, and Configuring 
  459.    Your System in your DOS manual.  Since most new programs make extensive 
  460.    use of the Environment, it is important to be sure enough Environment 
  461.    space is allocated to accommodate them all.  If you see the error 
  462.    message "Out of Environment Space", you know that you do not have 
  463.    enough allocated.
  464.  
  465.    You can view the contents of the Environment by issuing the DOS SET 
  466.    command with no arguments at the DOS prompt.  You will see a sequence of 
  467.    variable names, each followed by the "=" sign and the string value 
  468.    assigned to the variable.  For example, COMSPEC=C:\COMMAND.COM.  You can 
  469.    also store string information in the Environment with the SET command 
  470.    by specifying it in the same manner as it is displayed.  For example,
  471.    SET PATH=C:\;C:\DOS.  Do not place any spaces on either side of the "=" 
  472.    sign unless you intend for the space to be either a part of the variable 
  473.    name or a part of the string.  When DOS loads and runs a COM or EXE 
  474.    program file, that program receives a copy of the Environment as it is 
  475.    at that time, trimmed down so that only a few bytes remain free.  This 
  476.    copy does not change unless the program that owns it changes it.
  477.  
  478.    Note that some DOS "shells" shield the master environment from programs 
  479.    that are executed by the shell. If you find that to be the case, the 
  480.    information will usually be available to the BATch file from the 
  481.    environment of the secondary command processor loaded by the shell as is 
  482.    usually necessary to run a BATch file.  Except for the Z command, GET 
  483.    only attempts to locate the environment of the command processor that is 
  484.    running the BATch file, so the environment information can disappear if 
  485.    the shell or the secondary command processor is terminated.  GET 
  486.    attempts to place the information where the BATch file can locate it 
  487.    since that is its primary purpose.  Also, when running from a shell 
  488.    there may be problems with "Out of environment space" since DOS does not 
  489.    usually allocate excess environment space to child processes.  4DOS 
  490.    provides a means to ensure that copies of the environment have 
  491.    sufficient space available.  Check the documentation for your shell to 
  492.    see if it can make sufficient environment space available.  You can 
  493.    always ensure that GET has enough environment space to store its results 
  494.    by establishing a dummy GET variable before loading any shells or other 
  495.    programs.  The best way would be to do it in your AUTOEXEC.BAT.  Simply 
  496.    insert the command SET GET=xxxxxxxxxxxxxxxx in your AUTOEXEC.BAT file 
  497.    with enough x's or other characters for the maximum length input string 
  498.    you are expecting.  
  499.  
  500. PROGRAM INFORMATION:
  501.  
  502.   GET is programmed in assembly language for MS-DOS computers. It was
  503.   assembled with Borland's Turbo Assembler, and compressed with LZEXE. 
  504.   If you need more BATch programming capability than is included here, I 
  505.   suggest you look into one of the more general BATch programming 
  506.   products such as the Shareware product, Extended Batch Language (EBL) 
  507.   which is available through most sources of shareware.
  508.  
  509.   Some of the code for GET was adapted from the sample program named 
  510.   WHAT.ASM included with Microsoft Macro Assembler (MASM).  The MASM 
  511.   documentation declares that the sample programs are in the public 
  512.   domain. For examples of GET, look at the BATch files on the MASDIR 
  513.   disk mentioned below for the use of a similar program called SDL_GET.  
  514.   You can do a lot in BATch programming with this utility.  
  515.  
  516. LICENSING:  Although this version of GET remains free for personal use
  517.   for all to enjoy, if you like GET and would like to help support 
  518.   development of inexpensive software, please send a contribution to the 
  519.   address below.  Thank you for any support you care to provide.  If you 
  520.   send $15 or more you will receive the following benefits:
  521.     The latest version of GET with any new features.
  522.     A smaller runtime version to distribute with your BATch files.
  523.     A single user license with no royalties for use of the runtime version.
  524.     Printed documentation giving examples and more detailed explanations.
  525.     Free support by BBS, mail, phone, CompuServe, or Genie (see below).
  526.     Notification of new releases and inexpensive upgrades.
  527.   Corporate users must obtain a site license from me for in-house use.  
  528.   If GET is to be installed on 2 machines $25, 3 machines $35, plus $5 
  529.   for each additional machine.  None of the above licensing terms 
  530.   includes using GET in conjunction with the distribution of a 
  531.   commercial (retail) software product other than shareware, 
  532.   user-supported, or public domain software. To use GET in conjunction 
  533.   with the distribution of a retail software product you must contact 
  534.   me to discuss terms.  Call or message me if you are interested.
  535.  
  536.   BBS SYSOPs, PC User Groups, and shareware authors and distributors are 
  537.   hereby granted a single user license to use GET for their own purposes 
  538.   and to freely distribute unmodified copies of this version of GET.EXE
  539.   GET.DOC and GET22NEW.DOC together as a unit.  If an unregistered version
  540.   of GET is used in conjunction with the distribution of a shareware or
  541.   public domain software product, the distribution disk must include
  542.   GET.DOC and GET22NEW.DOC.
  543.  
  544.   If you have any questions, comments, or suggestions please contact me at:
  545.       MOBY DISK: 1021 San Carlos Road, Pebble Beach, CA 93953
  546.   Phone: (408) 646-1899/1373.  GENIE:MOBYDISK.  COMPUSERVE:72357,2276
  547.   BBS: The Cricket 408-373-3773           /s/ Bob Stephan   May 27, 1991
  548.  
  549.     Now for the commercial: If you like GET please try MASDIR!
  550.   MASDIR (pronounced 'master') the MASter DIRectory System, is a general
  551.   purpose sorted directory program with unique customization and disk label 
  552.   printing features. If you ever use DIR, you should do yourself a
  553.   favor and take a look at MASDIR. The main program, SDL.COM, is one of the
  554.   best sorted directory programs anywhere. The setup program allows you to
  555.   set the many defaults to your own specifications, including customizing
  556.   the titles that appear in the header. In addition, you can print disk
  557.   labels and/or sleeve inserts for 5.25" and 3.5" diskettes. This really
  558.   saves you a lot of time when you are looking through your collection of
  559.   diskettes for a particular file. They are all listed conveniently along
  560.   with your own description in the title lines. You can also create disk
  561.   file catalogs of your diskettes and directories that you can then
  562.   annotate to describe individual files.
  563.  
  564.   Additional features include listing only subdirectories or not 
  565.   listing them at all, listing only files created today or within a 
  566.   specified period, reverse sorting for any of the sort options,  the 
  567.   amount of space a group of files will occupy for different cluster 
  568.   sizes, support for DR DOS and 4DOS, SETting defaults in the environment, 
  569.   enter two file specifications such as *.COM *.EXE, paging up and 
  570.   down in large directories, show only files that have not been backed 
  571.   up, and many more.
  572.  
  573.   As of the above date, the current release of MASDIR is Version 5.4. It 
  574.   is a shareware program that is available on bulletin boards, GENIE, 
  575.   CompuServe, The Public (software) Library, and from other distributors 
  576.   of public domain and shareware programs. If you cannot conveniently 
  577.   locate a copy, I will be happy to send you one. Just contact me as 
  578.   indicated above. Thank you for your kind attention. /Bob/
  579.